package study.springboot.mvc.controller.rest;

import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import study.eggs.result.Result;
import study.eggs.result.Results;

import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/rest")
public class PostController {

    @RequestMapping("/postNobody")
    public Result postNobody() {
        log.info("postNobody");
        Map<String, Object> data = Maps.newHashMap();
        return Results.ok(data);
    }

    @RequestMapping("/post")
    public Result post(@RequestBody Map<String, Object> params) {
        Map<String, Object> data = Maps.newHashMap();
        return Results.ok(data);
    }
}
